home *** CD-ROM | disk | FTP | other *** search
/ Aminet 8 / Aminet 8 (1995)(GTI - Schatztruhe)[!][Oct 1995].iso / Aminet / comm / fido / SpotChef22.lha / SpotChef / SpotChef22.spot < prev    next >
Text File  |  1995-08-06  |  2KB  |  66 lines

  1. /*****************************************************************************
  2.                  SpotChef V2.2 - By Ian Forest (2:250/188.100)
  3.                       Copyright 1995, All rights reserved
  4. ******************************************************************************
  5.  
  6. Make sure that you edit the areas where the language files are kept!!!
  7.  
  8. *****************************************************************************/
  9.  
  10. TEMPDIR = 'T:'
  11.  
  12. Address Spot
  13. options results
  14. cr = '0d'x
  15.  
  16. 'IsMessages'
  17. If RC>0 Then Do
  18.   'RequestNotify PROMPT "Use only from the message window!"'
  19.    Exit
  20. End
  21.  
  22. 'requestresponse TITLE "Spot Chef V2.2 - (c)1995 Ian Forest (2:250/188.100)" PROMPT "Please choose a language (default is CHEF)" GADGETS "_Chef|_Jive|_ValSpeak|_Kraut|_Cancel" CENTER'
  23. select
  24.     when RC=0 then exit
  25.     when RC=1 then LANG="C:Chef"
  26.     when RC=2 then LANG="C:Jive"
  27.     when RC=3 then LANG="C:ValSpeak"
  28.         when RC=4 then LANG="C:Kraut"
  29.     otherwise 
  30. end
  31.  
  32. 'GetSubject'
  33. SUBJECT=Result
  34.  
  35. 'GetTo'
  36. TO=Result
  37.  
  38. 'GetFrom'
  39. FROM=Result
  40.  
  41. 'SaveAscii TO "'TEMPDIR'SpotChef.temp" OVERWRITE NOHEADER NOTEARLINE NOORIGIN NOKLUDGES'
  42.  
  43. If ~Open('Inp',TEMPDIR'SpotChef.temp','r') Then Do
  44.    'RequestNotify PROMPT "Cannot open temporary file:'TEMPDIR'SpotChef.temp"'
  45.    Exit
  46.    End
  47. call close('Inp')
  48.  
  49. Address Command LANG' <'TEMPDIR'SpotChef.temp >>'TEMPDIR'SpotChef2.temp'
  50. Address Command 'Delete >NIL: T:SpotChef.temp'
  51. Address Spot
  52.  
  53. 'requestresponse TITLE "Spot Chef V2.2 - (c)1995 Ian Forest (2:250/188.100)" PROMPT "Keep current message nuke it?" GADGETS "_Keep|_Nuke!|_Cancel" CENTER'
  54. select
  55.     when RC=0 then exit
  56.     when RC=2 then deletemessage NOREQ
  57.     otherwise 
  58. end
  59.  
  60. 'RequestResponse PROMPT "Edit message?" GADGETS "_Yes|_No"'
  61. wib = RC
  62. if wib=1 Then 'Write TO "'TO'" FROM "'FROM'" TOADDR "'fromaddr'" SUBJECT "[SC2.2] 'SUBJECT'" FILE "'TEMPDIR'SpotChef2.temp" NOSIG NOGUI'
  63. if wib=0 Then 'Write TO "'TO'" FROM "'FROM'" TOADDR "'fromaddr'" SUBJECT "[SC2.2] 'SUBJECT'" FILE "'TEMPDIR'SpotChef2.temp" NOSIG NOEDIT NOGUI'
  64. Address Command
  65. 'Delete >NIL: T:SpotChef2.temp'
  66.